package org.tang.springcloudvv.user.task;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.tang.springcloudvv.user.service.UserService;

import javax.annotation.PostConstruct;
import javax.sql.DataSource;

/**
 * <p><em>Created on 2021/12/3 3:08 下午</em></p>
 *
 * @author fuzhongtang
 * @since 1.0.1
 */
@Slf4j
@Component
public class UserTask {

    @Autowired
    private UserService userService;
    @Autowired
    private DataSource dataSource;

    //@PostConstruct
    public void checkUser()
    {
        Object obj = userService.getUser("tang");
        log.info("checkUser:{}",obj);
        log.info("dataSource:{}",dataSource.getClass().getName());
    }
}
